﻿package com.game.btnClass
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class BtnClass_scale extends AddMouseEvent
	{
		private var _overSacle:Number=1.1;
		private var _outScale:Number=1;
		public function BtnClass_scale(sp:DisplayObject, click:Function=null, mouseOut:Function=null, mouseOver:Function=null)
		{
			
			super(sp, click, mouseOut, mouseOver);
		}
		override protected function mouseOut(event:MouseEvent):void{
			var _mc:MovieClip=event.currentTarget as MovieClip;
			_mc.scaleX=_mc.scaleY=_outScale;
		}
		override protected function mouseOver(event:MouseEvent):void{
			var _mc:MovieClip=event.currentTarget as MovieClip;
			_mc.scaleX=_mc.scaleY=_overSacle;
		}
		override protected function  onClick(event:MouseEvent):void{
			var _mc:MovieClip=event.currentTarget as MovieClip;
			_mc.scaleX=_mc.scaleY=_outScale;
			_clickFun();
		}
	}
}